package 字符串类题目;

import java.util.Arrays;

/**
 * @author zc
 * @version 1.0
 * @date 2021/9/1 9:53
 */
public class Demo4 {
    public static void main(String[] args) {
        String[] array = {"123","abc","xyz","666"};

        String s = Arrays.toString(array);
        System.out.println("将数组直接转化为字符串的格式：");
        System.out.println(s);


        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < array.length; i++) {
            builder.append(array[i]);
        }
        System.out.println("将数组经过处理后得到的字符串格式：");
        System.out.println(builder);
    }
}
